import { createApp } from 'vue'
import App from './App.vue'
import router from './router'
import store from './store'
import './iconfont/iconfont.css'
import { useIntersectionObserver } from '@vueuse/core'

const app = createApp(App);
// import ElementPlus from 'element-plus'
// app.use(ElementPlus, { size: 'small', zIndex: 3000 })
app.directive("img-lazy", {
    mounted(el, binding) {
        const { stop } = useIntersectionObserver(
            el,
            ([{ isIntersecting }], observerElement) => {
                if (isIntersecting) {
                    el.show = true;

                }
            },
        )
    }
})

app.use(store).use(router).mount('#app')

